<template>
	<view class="content">
		<rich-text :nodes="mes"></rich-text>
	</view>
</template>

<script>
	import {
		getCompanyIntroduction,
		getAboutUs
	} from '@/api/peopleHide.js'
	export default{
		data() {
			return {
				mes:'',
				jointype:0
			}
		},
		onLoad(options) {
			if(options.jointype){
				this.jointype = options.jointype
				uni.setNavigationBarTitle({
					title:'关于我们'
				})
				this.getAboutUs()
			}else{
				uni.setNavigationBarTitle({
					title:'公司介绍'
				})
				this.getCompanyIntroduction()
			}
			
		},
		methods:{
			getCompanyIntroduction(){
				getCompanyIntroduction().then(res=>{
					this.mes = res.data.content.replace(/<img/gi,
								'<img style="max-width:100%;height:auto;float:left;display:block" ');
				})
			},
			getAboutUs(){
				getAboutUs().then(res=>{
					this.mes = res.data.content.replace(/<img/gi,
								'<img style="max-width:100%;height:auto;float:left;display:block" ');
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #fff;
	}
	.content{
		width: 100%;
		
	}
</style>
